<?php
	$appointmentId = $_POST['appointment_id'];
	$db = new PDO("sqlite:siwoz.db");
	$result = $db->query("UPDATE appointments SET state = 2 where id = '$appointmentId' ");
	echo "Wizyta została zakończona";
?>